<% 
  String service = request.getParameter("service"); 
  if ( service == null || service.length() == 0 ) service = "get-english-geocoder"; 
  String serviceURL = null, serviceStr = null, serviceDesc = null;
  if ( service.equals("get-english-geocoder")) {
	serviceURL = "geocoder/geocoder-service.xml";
	serviceStr = "geocode";
	serviceDesc = "English Document Geocoding Service";
  } else if ( service.equals("get-portuguese-geocoder")) {
	serviceURL = "geocoder-pt/geocoder-service.xml";
	serviceStr = "geocode";
	serviceDesc = "Portuguese Document Geocoding Service";
  } else if ( service.equals("get-english-map")) {
	serviceURL = "map.jsp";
	serviceStr = "geocoder/geocoder-service.xml";
	serviceDesc = "Map Visualization for English Document Geocoding Results";
  } else if ( service.equals("get-portuguese-map")) {
	serviceURL = "map.jsp";
	serviceStr = "geocoder-pt/geocoder-service.xml";
	serviceDesc = "Map Visualization for Portuguese Document Geocoding Results";
  }
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
 <head>
    <link href="style.css" media="screen" rel="stylesheet" type="text/css" />
    <title>Document Geocoding Web Service :: Live Demo</title>
 </head>

 <body style="margin-top:0px; padding-top:0px;">

  <div class="main" align="center">
      
      <table class="geocoder_table" cellpadding="5" cellspacing="1" align="center">
         <tbody><tr>
            <td>
            	<div class="left-head">
                    <h1><a>Document Geocoding Web Service :: Live Demo</a></h1>
                    <p>Using language model classifiers from LingPipe (Updated: 2011-08-30)</p>
                </div>
            </td>
         </tr></tbody>
      </table>
   
      <form id="geocoder_form" action="<%=serviceURL%>" method="post">
      <input type="hidden" name="service" value="<%=serviceStr%>" />
      <table class="geocoder_table" cellpadding="5" cellspacing="1" align="center">
         <tbody><tr class="geocoder_header">
            <td class="geocoder_header" colspan="2"><span class="geocoder_nice"><%=serviceDesc%></span></td>
         </tr>
         <tr height="300">
            <td class="geocoder_standard_menu">
			<b>Available Operations</b>:<br/><br/>
									 
										<br/>
										<div style="margin-bottom:3px;">
										
		<span style="float:right"><a href=""><img class="icon" src="book.png" alt="doc" /></a></span>
										
										<b><span class="querylink"><a href="">XML Web Services</span></b></a>:&nbsp;<a href=""><img class="icon" id="GroupByimg" src="controlopen.gif" alt="open" /></a></div>
			<div id="GroupBy" class="vis">
                	<div><a href="index.jsp?service=get-english-geocoder">English Geocoder</a></div>            
                	<div><a href="index.jsp?service=get-portuguese-geocoder">Portuguese Geocoder</a></div>   	
               		</div>
			<br/>
			<br/>

<div style="margin-bottom:3px;">
										
		<span style="float:right"><a href=""><img class="icon" src="book.png" alt="doc" /></a></span>
										
										<b><span class="querylink"><a href="">Map Visualizations</span></b></a>:&nbsp;<a href=""><img class="icon" id="GroupByimg" src="controlopen.gif" alt="open" /></a></div>
			<div id="GroupBy" class="vis">
                	<div><a href="index.jsp?service=get-english-map">English Geocoder</a></div>            
                	<div><a href="index.jsp?service=get-portuguese-map">Portuguese Geocoder</a></div>   	
               		</div>               		
            </td>
            <td class="geocoder_standard">
            	  <b>Textual contents</b> (required):<br/><br/>
            	  <textarea cols="60" id="document" name="document" rows="10">This is an example document.</textarea>		  
            </td>
         </tr>
      </tbody></table>
      
     <table class="geocoder_table" cellpadding="5" cellspacing="1" align="center">
         <tbody>
         <tr>
           <td class="geocoder_standard">
            <div class="left-bottom">
            	<input name="Execute" type="submit" value="Execute" />
            </div>
          </td>
         </tr>
         </tbody>
     </table>
            
   </div>

  </body>
</html>
